package com.bltec.emergency.service.resService.impl;

import com.bltec.emergency.mapper.ResTeamMapper;
import com.bltec.emergency.model.ResTeam;
import com.bltec.emergency.service.resService.ResTeamService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ResTeamServiceImpl implements ResTeamService {
    @Resource
    private ResTeamMapper resTeamMapper;
    @Override
    public boolean add(ResTeam resTeam) {
        return resTeamMapper.insert(resTeam);
    }

    @Override
    public boolean deleteResTeamById(Long id) {
        return resTeamMapper.setDisableById(id);
    }

    @Override
    public boolean updateResTeamById(ResTeam resTeam) {
        return resTeamMapper.updateResTeamById(resTeam);
    }

    @Override
    public ResTeam getResTeamById(Long id) {
        return resTeamMapper.getResTeamById(id);
    }

    @Override
    public List<ResTeam> getAll() {
        return resTeamMapper.selectAll();
    }
}
